﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BusinessService.Plugin.Entity
{
    /// <summary>
    /// 数据源设置主表
    /// </summary>
    [TenantAttribute("1")]//对应ConfigId
    public class ParameterSettings
    {
        /// <summary>
        /// 主键N_Id
        /// </summary>
        [SugarColumn(ColumnDescription = "ID主键", IsPrimaryKey = true)]
        public virtual long ID { get; set; }
        /// <summary>
        /// 数据源名称
        /// </summary>
    
        public string Name { get; set; }
        /// <summary>
        /// 协议类型
        /// </summary>
        public string V_ProtocolType { get; set; }

        /// <summary>
        /// 连接对象
        /// </summary>
        public string Link { get; set; }


        /// <summary>
        /// 【数据源类型为DataBase时有效】“否”=选择单行数据; “是”=选择多行数据
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string SingleAndDouble { get; set; }


 
        /// <summary>
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }
    /// <summary>
    /// 条件筛选子表
    /// </summary>
    [TenantAttribute("1")]//对应ConfigId
    public class FilterTable
    {
        /// <summary>
        /// 主键N_Id
        /// </summary>
        [SugarColumn(ColumnDescription = "ID主键", IsPrimaryKey = true)]
        public  long ID { get; set; } 
        /// <summary>
        /// 主表Id
        /// </summary>
        public  long P_Id { get; set; }
        /// <summary>
        /// 选择比较对象
        /// </summary>
        public string SelectItem { get; set; }
        /// <summary>
        /// 比较行为
        /// </summary>
        public string CompareAction { get; set; }
        /// <summary>
        /// 目标值
        /// </summary>
        public string TargetValue { get; set; }
        /// <summary>
        /// C#类型名称
        /// </summary>
        public string CSharpTypeName { get; set; }
    }
    /// <summary>
    /// 字段选择子表
    /// </summary>
    [TenantAttribute("1")]//对应ConfigId
    public class SelectFields
    {
        /// <summary>
        /// 主键N_Id
        /// </summary>
        [SugarColumn(ColumnDescription = "ID主键", IsPrimaryKey = true)]
        public  long ID { get; set; }
        /// <summary>
        /// 主表Id
        /// </summary>
        public  long P_Id { get; set; }
        /// <summary>
        /// 选择字段
        /// </summary>
        public  string SelectField { get; set; }
        /// <summary>
        /// 字段别名
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public virtual string FieldAlias { get; set; }

        /// <summary>
        /// 是否分组
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string IsGroupBy { get; set; }

        /// <summary>
        /// 计算方式
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string ComputeMode { get; set; }
        /// <summary>
        /// 字段排序
        /// </summary>
        public string FieldSort{ get; set; }





    }
}
